
#ifndef __DLG_CONTACT_CARD__
#define __DLG_CONTACT_CARD__

#include "afxwin.h"
#include "Resource.h"
#include <ui/dialogbase.h>
#include <interface/global_data_interface.h>
class dlg_contact_card : public CDialogBase
{
	DECLARE_DYNAMIC(dlg_contact_card)
public:
	dlg_contact_card(CWnd* pParent = NULL);
	virtual ~dlg_contact_card();
	enum { IDD = IDD_CONTACTCARD };
protected:
	virtual void DoDataExchange(CDataExchange* pDX);
	DECLARE_MESSAGE_MAP()
public:
	static void new_instance();
	static dlg_contact_card* get_instance();
	static void delete_instance();
	static dlg_contact_card* this_;

protected:
	virtual BOOL OnInitDialog();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	virtual void PostNcDestroy();
	afx_msg void OnClose();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnBnClickedBtnSendSms();
	afx_msg void OnBnClickedBtnTataChat();
	afx_msg void OnBnClickedBtnAddToContact();
	void repos_wnd();

public:
	void change_language();
	void set_card_info(aot::data::icontact_info* contact_info, bool is_buddy);
	CString get_user_face_img(CString user_id, int sex);
	void show_phone_cmd();
	void set_main_wnd(HWND hwnd){ this->main_wnd_ = hwnd; }
	void set_dlg_pos();
	void clean_data();

	bool is_hide_wnd_;

private:
	HWND main_wnd_;
	CString company_;
	CString department_;
	CString phone_work_;
	CString mobile_;
	CString phone_home_;
	CString name_;
	CString user_id_;
	int sex_;
	CButton user_figure_wnd_;
	bool is_buddy_;
	CToolTipCtrl tooltip_;
	int contact_id_;
public:
	CString email_;
	afx_msg void OnStnClickedStaticWorktel();
	afx_msg void OnStnClickedStaticMobile();
	afx_msg void OnStnClickedStaticEmail();
	afx_msg void OnBnClickedBtnShowDetailInfo();

	CStatic static_user_name_;
	CButton btn_chat_;
	CButton btn_add_contact_;
	CButton btn_show_detail_;
	CStatic static_compnay_;
	CStatic static_depart_;
	CStatic static_title;
	CStatic static_title_mobile_;
	CStatic static_title_email_;
	CStatic static_worktel_;
	CStatic static_mobile_;
	CStatic static_email_;
	CButton btn_send_sms_;
};
#endif